<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="../../vue.js"></script>
    <style>
        #box {
            width: 200px;
            height: 300px;
            background-color: aqua;
        }
    </style>
</head>

<body>
    <div id="app">
        <button @click="isShow=true">出现</button>
        <div id="box" v-show="isShow" @click="isShow=false">
            <div @click.stop>
                <p>用户名：<input type="text" /></p>
                <p>密码：<input type="text" /></p>
                <button>登录</button>
            </div>
        </div>
    </div>
    <script>
        new Vue({
            el: "#app",
            data: {
                isShow: false,
            },
            methods: {},
        });
    </script>
</body>

</html>